<?php
$query = "SELECT  `katigoria`.`id` AS `katigoria_id`, `katigoria`.`perigrafi` AS `katigoria_perigrafi`
	FROM `katigoria`
	ORDER BY `katigoria_id` ASC";

mysqli_set_charset(Globals::$db, "utf8");
$result = mysqli_query(Globals::$db, $query);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {

	echo "katigories.push(new katigoria(" .
		$row['katigoria_id'] . "," .
		"'" . $row['katigoria_perigrafi'] . "'" .
		")); \n";
}
mysqli_free_result($result);
?>
